<template>
  <i class="daai-icon" :class="{ [`daai-icon--${attrs.type}`]: attrs.type }">
    <!-- 对这个组件做二次封装 -->
    <font-awesome-icon v-bind="props" />
  </i>
</template>

<script setup>
import { useAttrs } from 'vue'
import propTypes from './props.js'
defineOptions({
  name: 'DaaiIcon',
})
const props = defineProps(propTypes) // 定义属性
const attrs = useAttrs() // 接收未定义属性
</script>

<style lang="scss" scoped></style>
